home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / nkcache / nsICacheEntryDescriptor.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  18KB  |  464 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICacheEntryDescriptor.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICacheEntryDescriptor_h__
  6. #define __gen_nsICacheEntryDescriptor_h__
  7.  
  8.  
  9. #ifndef __gen_nsICacheVisitor_h__
  10. #include "nsICacheVisitor.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsICache_h__
  14. #include "nsICache.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class nsISimpleEnumerator; /* forward declaration */
  22.  
  23. class nsICacheListener; /* forward declaration */
  24.  
  25. class nsIInputStream; /* forward declaration */
  26.  
  27. class nsIOutputStream; /* forward declaration */
  28.  
  29. class nsIFile; /* forward declaration */
  30.  
  31. class nsICacheMetaDataVisitor; /* forward declaration */
  32.  
  33.  
  34. /* starting interface:    nsICacheEntryDescriptor */
  35. #define NS_ICACHEENTRYDESCRIPTOR_IID_STR "49c1a11d-f5d2-4f09-8262-551e64908ada"
  36.  
  37. #define NS_ICACHEENTRYDESCRIPTOR_IID \
  38.   {0x49c1a11d, 0xf5d2, 0x4f09, \
  39.     { 0x82, 0x62, 0x55, 0x1e, 0x64, 0x90, 0x8a, 0xda }}
  40.  
  41. class NS_NO_VTABLE nsICacheEntryDescriptor : public nsICacheEntryInfo {
  42.  public: 
  43.  
  44.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICACHEENTRYDESCRIPTOR_IID)
  45.  
  46.   /**
  47.      * Set the time at which the cache entry should be considered invalid (in
  48.      * seconds since the Epoch).
  49.      */
  50.   /* void setExpirationTime (in PRUint32 expirationTime); */
  51.   NS_IMETHOD SetExpirationTime(PRUint32 expirationTime) = 0;
  52.  
  53.   /**
  54.      * Set the cache entry data size.  This will fail if the cache entry
  55.      * IS stream based.
  56.      */
  57.   /* void setDataSize (in unsigned long size); */
  58.   NS_IMETHOD SetDataSize(PRUint32 size) = 0;
  59.  
  60.   /**
  61.      * Open blocking input stream to cache data.  This will fail if the cache
  62.      * entry IS NOT stream based.  Use the stream transport service to
  63.      * asynchronously read this stream on a background thread.  The returned
  64.      * stream MAY implement nsISeekableStream.
  65.      *
  66.      * @param offset
  67.      *        read starting from this offset into the cached data.  an offset
  68.      *        beyond the end of the stream has undefined consequences.
  69.      *
  70.      * @return blocking, unbuffered input stream.
  71.      */
  72.   /* nsIInputStream openInputStream (in unsigned long offset); */
  73.   NS_IMETHOD OpenInputStream(PRUint32 offset, nsIInputStream **_retval) = 0;
  74.  
  75.   /**
  76.      * Open blocking output stream to cache data.  This will fail if the cache
  77.      * entry IS NOT stream based.  Use the stream transport service to
  78.      * asynchronously write to this stream on a background thread.  The returned
  79.      * stream MAY implement nsISeekableStream.
  80.      *
  81.      * If opening an output stream to existing cached data, the data will be
  82.      * truncated to the specified offset.
  83.      *
  84.      * @param offset
  85.      *        write starting from this offset into the cached data.  an offset
  86.      *        beyond the end of the stream has undefined consequences.
  87.      *
  88.      * @return blocking, unbuffered output stream.
  89.      */
  90.   /* nsIOutputStream openOutputStream (in unsigned long offset); */
  91.   NS_IMETHOD OpenOutputStream(PRUint32 offset, nsIOutputStream **_retval) = 0;
  92.  
  93.   /**
  94.      * Get/set the cache data element.  This will fail if the cache entry
  95.      * IS stream based.  The cache entry holds a strong reference to this
  96.      * object.  The object will be released when the cache entry is destroyed.
  97.      */
  98.   /* attribute nsISupports cacheElement; */
  99.   NS_IMETHOD GetCacheElement(nsISupports * *aCacheElement) = 0;
  100.   NS_IMETHOD SetCacheElement(nsISupports * aCacheElement) = 0;
  101.  
  102.   /**
  103.      * Get the access granted to this descriptor.  See nsICache.idl for the
  104.      * definitions of the access modes and a thorough description of their
  105.      * corresponding meanings.
  106.      */
  107.   /* readonly attribute nsCacheAccessMode accessGranted; */
  108.   NS_IMETHOD GetAccessGranted(nsCacheAccessMode *aAccessGranted) = 0;
  109.  
  110.   /**
  111.      * Get/set the storage policy of the cache entry.  See nsICache.idl for
  112.      * the definitions of the storage policies.
  113.      */
  114.   /* attribute nsCacheStoragePolicy storagePolicy; */
  115.   NS_IMETHOD GetStoragePolicy(nsCacheStoragePolicy *aStoragePolicy) = 0;
  116.   NS_IMETHOD SetStoragePolicy(nsCacheStoragePolicy aStoragePolicy) = 0;
  117.  
  118.   /**
  119.      * Get the disk file associated with the cache entry.
  120.      */
  121.   /* readonly attribute nsIFile file; */
  122.   NS_IMETHOD GetFile(nsIFile * *aFile) = 0;
  123.  
  124.   /**
  125.      * Get/set security info on the cache entry for this descriptor.  This fails
  126.      * if the storage policy is not STORE_IN_MEMORY.
  127.      */
  128.   /* attribute nsISupports securityInfo; */
  129.   NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) = 0;
  130.   NS_IMETHOD SetSecurityInfo(nsISupports * aSecurityInfo) = 0;
  131.  
  132.   /**
  133.      * Doom the cache entry this descriptor references in order to slate it for 
  134.      * removal.  Once doomed a cache entry cannot be undoomed.
  135.      *
  136.      * A descriptor with WRITE access can doom the cache entry and choose to
  137.      * fail pending requests.  This means that pending requests will not get
  138.      * a cache descriptor.  This is meant as a tool for clients that wish to
  139.      * instruct pending requests to skip the cache.
  140.      */
  141.   /* void doom (); */
  142.   NS_IMETHOD Doom(void) = 0;
  143.  
  144.   /* void doomAndFailPendingRequests (in nsresult status); */
  145.   NS_IMETHOD DoomAndFailPendingRequests(nsresult status) = 0;
  146.  
  147.   /**
  148.      * A writer must validate this cache object before any readers are given
  149.      * a descriptor to the object.
  150.      */
  151.   /* void markValid (); */
  152.   NS_IMETHOD MarkValid(void) = 0;
  153.  
  154.   /**
  155.      *  Explicitly close the descriptor (optional).
  156.      */
  157.   /* void close (); */
  158.   NS_IMETHOD Close(void) = 0;
  159.  
  160.   /**
  161.      * Methods for accessing meta data.  Meta data is a table of key/value
  162.      * string pairs.  The strings do not have to conform to any particular
  163.      * charset, but they must be null terminated.
  164.      */
  165.   /* string getMetaDataElement (in string key); */
  166.   NS_IMETHOD GetMetaDataElement(const char *key, char **_retval) = 0;
  167.  
  168.   /* void setMetaDataElement (in string key, in string value); */
  169.   NS_IMETHOD SetMetaDataElement(const char *key, const char *value) = 0;
  170.  
  171.   /**
  172.      * Visitor will be called with key/value pair for each meta data element.
  173.      */
  174.   /* void visitMetaData (in nsICacheMetaDataVisitor visitor); */
  175.   NS_IMETHOD VisitMetaData(nsICacheMetaDataVisitor *visitor) = 0;
  176.  
  177. };
  178.  
  179. /* Use this macro when declaring classes that implement this interface. */
  180. #define NS_DECL_NSICACHEENTRYDESCRIPTOR \
  181.   NS_IMETHOD SetExpirationTime(PRUint32 expirationTime); \
  182.   NS_IMETHOD SetDataSize(PRUint32 size); \
  183.   NS_IMETHOD OpenInputStream(PRUint32 offset, nsIInputStream **_retval); \
  184.   NS_IMETHOD OpenOutputStream(PRUint32 offset, nsIOutputStream **_retval); \
  185.   NS_IMETHOD GetCacheElement(nsISupports * *aCacheElement); \
  186.   NS_IMETHOD SetCacheElement(nsISupports * aCacheElement); \
  187.   NS_IMETHOD GetAccessGranted(nsCacheAccessMode *aAccessGranted); \
  188.   NS_IMETHOD GetStoragePolicy(nsCacheStoragePolicy *aStoragePolicy); \
  189.   NS_IMETHOD SetStoragePolicy(nsCacheStoragePolicy aStoragePolicy); \
  190.   NS_IMETHOD GetFile(nsIFile * *aFile); \
  191.   NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo); \
  192.   NS_IMETHOD SetSecurityInfo(nsISupports * aSecurityInfo); \
  193.   NS_IMETHOD Doom(void); \
  194.   NS_IMETHOD DoomAndFailPendingRequests(nsresult status); \
  195.   NS_IMETHOD MarkValid(void); \
  196.   NS_IMETHOD Close(void); \
  197.   NS_IMETHOD GetMetaDataElement(const char *key, char **_retval); \
  198.   NS_IMETHOD SetMetaDataElement(const char *key, const char *value); \
  199.   NS_IMETHOD VisitMetaData(nsICacheMetaDataVisitor *visitor); 
  200.  
  201. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  202. #define NS_FORWARD_NSICACHEENTRYDESCRIPTOR(_to) \
  203.   NS_IMETHOD SetExpirationTime(PRUint32 expirationTime) { return _to SetExpirationTime(expirationTime); } \
  204.   NS_IMETHOD SetDataSize(PRUint32 size) { return _to SetDataSize(size); } \
  205.   NS_IMETHOD OpenInputStream(PRUint32 offset, nsIInputStream **_retval) { return _to OpenInputStream(offset, _retval); } \
  206.   NS_IMETHOD OpenOutputStream(PRUint32 offset, nsIOutputStream **_retval) { return _to OpenOutputStream(offset, _retval); } \
  207.   NS_IMETHOD GetCacheElement(nsISupports * *aCacheElement) { return _to GetCacheElement(aCacheElement); } \
  208.   NS_IMETHOD SetCacheElement(nsISupports * aCacheElement) { return _to SetCacheElement(aCacheElement); } \
  209.   NS_IMETHOD GetAccessGranted(nsCacheAccessMode *aAccessGranted) { return _to GetAccessGranted(aAccessGranted); } \
  210.   NS_IMETHOD GetStoragePolicy(nsCacheStoragePolicy *aStoragePolicy) { return _to GetStoragePolicy(aStoragePolicy); } \
  211.   NS_IMETHOD SetStoragePolicy(nsCacheStoragePolicy aStoragePolicy) { return _to SetStoragePolicy(aStoragePolicy); } \
  212.   NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
  213.   NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { return _to GetSecurityInfo(aSecurityInfo); } \
  214.   NS_IMETHOD SetSecurityInfo(nsISupports * aSecurityInfo) { return _to SetSecurityInfo(aSecurityInfo); } \
  215.   NS_IMETHOD Doom(void) { return _to Doom(); } \
  216.   NS_IMETHOD DoomAndFailPendingRequests(nsresult status) { return _to DoomAndFailPendingRequests(status); } \
  217.   NS_IMETHOD MarkValid(void) { return _to MarkValid(); } \
  218.   NS_IMETHOD Close(void) { return _to Close(); } \
  219.   NS_IMETHOD GetMetaDataElement(const char *key, char **_retval) { return _to GetMetaDataElement(key, _retval); } \
  220.   NS_IMETHOD SetMetaDataElement(const char *key, const char *value) { return _to SetMetaDataElement(key, value); } \
  221.   NS_IMETHOD VisitMetaData(nsICacheMetaDataVisitor *visitor) { return _to VisitMetaData(visitor); } 
  222.  
  223. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  224. #define NS_FORWARD_SAFE_NSICACHEENTRYDESCRIPTOR(_to) \
  225.   NS_IMETHOD SetExpirationTime(PRUint32 expirationTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetExpirationTime(expirationTime); } \
  226.   NS_IMETHOD SetDataSize(PRUint32 size) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataSize(size); } \
  227.   NS_IMETHOD OpenInputStream(PRUint32 offset, nsIInputStream **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenInputStream(offset, _retval); } \
  228.   NS_IMETHOD OpenOutputStream(PRUint32 offset, nsIOutputStream **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenOutputStream(offset, _retval); } \
  229.   NS_IMETHOD GetCacheElement(nsISupports * *aCacheElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCacheElement(aCacheElement); } \
  230.   NS_IMETHOD SetCacheElement(nsISupports * aCacheElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCacheElement(aCacheElement); } \
  231.   NS_IMETHOD GetAccessGranted(nsCacheAccessMode *aAccessGranted) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessGranted(aAccessGranted); } \
  232.   NS_IMETHOD GetStoragePolicy(nsCacheStoragePolicy *aStoragePolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStoragePolicy(aStoragePolicy); } \
  233.   NS_IMETHOD SetStoragePolicy(nsCacheStoragePolicy aStoragePolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStoragePolicy(aStoragePolicy); } \
  234.   NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  235.   NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityInfo(aSecurityInfo); } \
  236.   NS_IMETHOD SetSecurityInfo(nsISupports * aSecurityInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecurityInfo(aSecurityInfo); } \
  237.   NS_IMETHOD Doom(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Doom(); } \
  238.   NS_IMETHOD DoomAndFailPendingRequests(nsresult status) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoomAndFailPendingRequests(status); } \
  239.   NS_IMETHOD MarkValid(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkValid(); } \
  240.   NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  241.   NS_IMETHOD GetMetaDataElement(const char *key, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMetaDataElement(key, _retval); } \
  242.   NS_IMETHOD SetMetaDataElement(const char *key, const char *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMetaDataElement(key, value); } \
  243.   NS_IMETHOD VisitMetaData(nsICacheMetaDataVisitor *visitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitMetaData(visitor); } 
  244.  
  245. #if 0
  246. /* Use the code below as a template for the implementation class for this interface. */
  247.  
  248. /* Header file */
  249. class nsCacheEntryDescriptor : public nsICacheEntryDescriptor
  250. {
  251. public:
  252.   NS_DECL_ISUPPORTS
  253.   NS_DECL_NSICACHEENTRYDESCRIPTOR
  254.  
  255.   nsCacheEntryDescriptor();
  256.  
  257. private:
  258.   ~nsCacheEntryDescriptor();
  259.  
  260. protected:
  261.   /* additional members */
  262. };
  263.  
  264. /* Implementation file */
  265. NS_IMPL_ISUPPORTS1(nsCacheEntryDescriptor, nsICacheEntryDescriptor)
  266.  
  267. nsCacheEntryDescriptor::nsCacheEntryDescriptor()
  268. {
  269.   /* member initializers and constructor code */
  270. }
  271.  
  272. nsCacheEntryDescriptor::~nsCacheEntryDescriptor()
  273. {
  274.   /* destructor code */
  275. }
  276.  
  277. /* void setExpirationTime (in PRUint32 expirationTime); */
  278. NS_IMETHODIMP nsCacheEntryDescriptor::SetExpirationTime(PRUint32 expirationTime)
  279. {
  280.     return NS_ERROR_NOT_IMPLEMENTED;
  281. }
  282.  
  283. /* void setDataSize (in unsigned long size); */
  284. NS_IMETHODIMP nsCacheEntryDescriptor::SetDataSize(PRUint32 size)
  285. {
  286.     return NS_ERROR_NOT_IMPLEMENTED;
  287. }
  288.  
  289. /* nsIInputStream openInputStream (in unsigned long offset); */
  290. NS_IMETHODIMP nsCacheEntryDescriptor::OpenInputStream(PRUint32 offset, nsIInputStream **_retval)
  291. {
  292.     return NS_ERROR_NOT_IMPLEMENTED;
  293. }
  294.  
  295. /* nsIOutputStream openOutputStream (in unsigned long offset); */
  296. NS_IMETHODIMP nsCacheEntryDescriptor::OpenOutputStream(PRUint32 offset, nsIOutputStream **_retval)
  297. {
  298.     return NS_ERROR_NOT_IMPLEMENTED;
  299. }
  300.  
  301. /* attribute nsISupports cacheElement; */
  302. NS_IMETHODIMP nsCacheEntryDescriptor::GetCacheElement(nsISupports * *aCacheElement)
  303. {
  304.     return NS_ERROR_NOT_IMPLEMENTED;
  305. }
  306. NS_IMETHODIMP nsCacheEntryDescriptor::SetCacheElement(nsISupports * aCacheElement)
  307. {
  308.     return NS_ERROR_NOT_IMPLEMENTED;
  309. }
  310.  
  311. /* readonly attribute nsCacheAccessMode accessGranted; */
  312. NS_IMETHODIMP nsCacheEntryDescriptor::GetAccessGranted(nsCacheAccessMode *aAccessGranted)
  313. {
  314.     return NS_ERROR_NOT_IMPLEMENTED;
  315. }
  316.  
  317. /* attribute nsCacheStoragePolicy storagePolicy; */
  318. NS_IMETHODIMP nsCacheEntryDescriptor::GetStoragePolicy(nsCacheStoragePolicy *aStoragePolicy)
  319. {
  320.     return NS_ERROR_NOT_IMPLEMENTED;
  321. }
  322. NS_IMETHODIMP nsCacheEntryDescriptor::SetStoragePolicy(nsCacheStoragePolicy aStoragePolicy)
  323. {
  324.     return NS_ERROR_NOT_IMPLEMENTED;
  325. }
  326.  
  327. /* readonly attribute nsIFile file; */
  328. NS_IMETHODIMP nsCacheEntryDescriptor::GetFile(nsIFile * *aFile)
  329. {
  330.     return NS_ERROR_NOT_IMPLEMENTED;
  331. }
  332.  
  333. /* attribute nsISupports securityInfo; */
  334. NS_IMETHODIMP nsCacheEntryDescriptor::GetSecurityInfo(nsISupports * *aSecurityInfo)
  335. {
  336.     return NS_ERROR_NOT_IMPLEMENTED;
  337. }
  338. NS_IMETHODIMP nsCacheEntryDescriptor::SetSecurityInfo(nsISupports * aSecurityInfo)
  339. {
  340.     return NS_ERROR_NOT_IMPLEMENTED;
  341. }
  342.  
  343. /* void doom (); */
  344. NS_IMETHODIMP nsCacheEntryDescriptor::Doom()
  345. {
  346.     return NS_ERROR_NOT_IMPLEMENTED;
  347. }
  348.  
  349. /* void doomAndFailPendingRequests (in nsresult status); */
  350. NS_IMETHODIMP nsCacheEntryDescriptor::DoomAndFailPendingRequests(nsresult status)
  351. {
  352.     return NS_ERROR_NOT_IMPLEMENTED;
  353. }
  354.  
  355. /* void markValid (); */
  356. NS_IMETHODIMP nsCacheEntryDescriptor::MarkValid()
  357. {
  358.     return NS_ERROR_NOT_IMPLEMENTED;
  359. }
  360.  
  361. /* void close (); */
  362. NS_IMETHODIMP nsCacheEntryDescriptor::Close()
  363. {
  364.     return NS_ERROR_NOT_IMPLEMENTED;
  365. }
  366.  
  367. /* string getMetaDataElement (in string key); */
  368. NS_IMETHODIMP nsCacheEntryDescriptor::GetMetaDataElement(const char *key, char **_retval)
  369. {
  370.     return NS_ERROR_NOT_IMPLEMENTED;
  371. }
  372.  
  373. /* void setMetaDataElement (in string key, in string value); */
  374. NS_IMETHODIMP nsCacheEntryDescriptor::SetMetaDataElement(const char *key, const char *value)
  375. {
  376.     return NS_ERROR_NOT_IMPLEMENTED;
  377. }
  378.  
  379. /* void visitMetaData (in nsICacheMetaDataVisitor visitor); */
  380. NS_IMETHODIMP nsCacheEntryDescriptor::VisitMetaData(nsICacheMetaDataVisitor *visitor)
  381. {
  382.     return NS_ERROR_NOT_IMPLEMENTED;
  383. }
  384.  
  385. /* End of implementation class template. */
  386. #endif
  387.  
  388.  
  389. /* starting interface:    nsICacheMetaDataVisitor */
  390. #define NS_ICACHEMETADATAVISITOR_IID_STR "22f9a49c-3cf8-4c23-8006-54efb11ac562"
  391.  
  392. #define NS_ICACHEMETADATAVISITOR_IID \
  393.   {0x22f9a49c, 0x3cf8, 0x4c23, \
  394.     { 0x80, 0x06, 0x54, 0xef, 0xb1, 0x1a, 0xc5, 0x62 }}
  395.  
  396. class NS_NO_VTABLE nsICacheMetaDataVisitor : public nsISupports {
  397.  public: 
  398.  
  399.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICACHEMETADATAVISITOR_IID)
  400.  
  401.   /**
  402.      * Called for each key/value pair in the meta data for a cache entry
  403.      */
  404.   /* boolean visitMetaDataElement (in string key, in string value); */
  405.   NS_IMETHOD VisitMetaDataElement(const char *key, const char *value, PRBool *_retval) = 0;
  406.  
  407. };
  408.  
  409. /* Use this macro when declaring classes that implement this interface. */
  410. #define NS_DECL_NSICACHEMETADATAVISITOR \
  411.   NS_IMETHOD VisitMetaDataElement(const char *key, const char *value, PRBool *_retval); 
  412.  
  413. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  414. #define NS_FORWARD_NSICACHEMETADATAVISITOR(_to) \
  415.   NS_IMETHOD VisitMetaDataElement(const char *key, const char *value, PRBool *_retval) { return _to VisitMetaDataElement(key, value, _retval); } 
  416.  
  417. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  418. #define NS_FORWARD_SAFE_NSICACHEMETADATAVISITOR(_to) \
  419.   NS_IMETHOD VisitMetaDataElement(const char *key, const char *value, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitMetaDataElement(key, value, _retval); } 
  420.  
  421. #if 0
  422. /* Use the code below as a template for the implementation class for this interface. */
  423.  
  424. /* Header file */
  425. class nsCacheMetaDataVisitor : public nsICacheMetaDataVisitor
  426. {
  427. public:
  428.   NS_DECL_ISUPPORTS
  429.   NS_DECL_NSICACHEMETADATAVISITOR
  430.  
  431.   nsCacheMetaDataVisitor();
  432.  
  433. private:
  434.   ~nsCacheMetaDataVisitor();
  435.  
  436. protected:
  437.   /* additional members */
  438. };
  439.  
  440. /* Implementation file */
  441. NS_IMPL_ISUPPORTS1(nsCacheMetaDataVisitor, nsICacheMetaDataVisitor)
  442.  
  443. nsCacheMetaDataVisitor::nsCacheMetaDataVisitor()
  444. {
  445.   /* member initializers and constructor code */
  446. }
  447.  
  448. nsCacheMetaDataVisitor::~nsCacheMetaDataVisitor()
  449. {
  450.   /* destructor code */
  451. }
  452.  
  453. /* boolean visitMetaDataElement (in string key, in string value); */
  454. NS_IMETHODIMP nsCacheMetaDataVisitor::VisitMetaDataElement(const char *key, const char *value, PRBool *_retval)
  455. {
  456.     return NS_ERROR_NOT_IMPLEMENTED;
  457. }
  458.  
  459. /* End of implementation class template. */
  460. #endif
  461.  
  462.  
  463. #endif /* __gen_nsICacheEntryDescriptor_h__ */
  464.